//page页面的所有逻辑
var page_title = document.querySelector('.page_title')
var page_classify = document.querySelector('.page_classify')
var page_content = document.querySelector('.page_content')
var page_time = document.querySelector('.page_time')
//获取文章的id
const id = location.href.split('?')[1].split('=')[1]
//根据id从服务器获取对应的文章
//获取数据 + 渲染
myAjax('GET','/getOneArticleById?id=' + id,null).then((e)=>{
    var obj = JSON.parse(e)
    page_title.innerText = obj.title
    page_classify.innerText = obj.classify
    page_time.innerText = obj.time
    page_content.innerText = obj.content
})